<template>
  <Header>修改密码</Header>

  <el-card class="card-box">
    <div class="btn">
      <el-form label-width="80px" class="demo-ruleForm" :model="validata">
        <el-form-item
          label="登陆名"
          prop="longin"
          :rules="[
            { required: true, message: '登录名不能为空', trigger: 'blur' },
          ]"
        >
          <el-input
            type="text"
            autocomplete="off"
            v-model="validata.longin"
          ></el-input>
        </el-form-item>

        <el-form-item
          label="昵称"
          prop="nic"
          :rules="[
            { required: true, message: '昵称不能为空', trigger: 'blur' },
          ]"
        >
          <el-input
            type="text"
            autocomplete="off"
            v-model="validata.nic"
          ></el-input>
        </el-form-item>

        <el-button type="primary" @click="determine">确定修改</el-button>
      </el-form>
    </div>
  </el-card>

  <el-card class="card-box">
    <div class="btn">
      <el-form label-width="80px" class="demo-ruleForm" :model="validata">
        <el-form-item
          label="原密码"
          prop="oldpas"
          :rules="[{ required: true, message: '不能为空哟', trigger: 'blur' }]"
        >
          <el-input
            type="password"
            autocomplete="off"
            v-model="validata.oldpas"
          ></el-input>
        </el-form-item>

        <el-form-item
          label="新密码"
          prop="newpas"
          :rules="[{ required: true, message: '不能为空哟', trigger: 'blur' }]"
        >
          <el-input
            type="password"
            autocomplete="off"
            v-model="validata.newpas"
          ></el-input>
        </el-form-item>

        <el-button type="primary" @click="determine">确定修改</el-button>
      </el-form>
    </div>
  </el-card>
</template>

<script>
import Header from "@/components/Header/Header.vue"
import { ElMessage } from "element-plus"

export default {
  data() {
    return {
      validata: {
        longin: "admin",
        nic: "七岁",
        oldpas: "",
        newpas: "",
      },
    }
  },
  components: {
    Header,
  },
  methods: {
    determine() {
      ElMessage({
        type: "error",
        message: "还不能修改哟，目前还没有实现修改功能",
      })
    },
  },
}
</script>

<style lang="less" scoped>
.btn {
  width: 300px;
  height: 230px;
}

.card-box {
  margin: 20px;
}

.el-button {
  margin-left: 80px;
}
</style>
